package tbalert.web.dao.impl;

import org.hibernate.HibernateException;

import tbalert.hibernate3.HibernateBaseDao;
import tbalert.web.dao.DpsybDao;
import tbalert.web.entity.Dpsyb;

public class DpsybDaoImpl extends HibernateBaseDao<Dpsyb, String> implements DpsybDao {
	
	@Override
	public Dpsyb deleteById(String kicid) {
		Dpsyb entity = super.get(kicid);
		if (entity != null) {
			getSession().delete(entity);
		}
		return entity;
	}

	@Override
	public Dpsyb save(Dpsyb bean) throws HibernateException {
		getSession().save(bean);
		return bean;
	}

	@Override
	public Dpsyb findById(String kicid) {
		return get(kicid);
	}

	@Override
	protected Class<Dpsyb> getEntityClass() {
		return Dpsyb.class;
	}
}
